package com.wteam.dragon.shop.pojo.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.wteam.dragon.system.basebean.bean.BaseBean;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 秒杀活动
 * @Author 陈晓辉
 * @Date 2021/3/24 9:54
 */
@Data
@Table
@TableName
@EqualsAndHashCode(callSuper = true)
public class FlashPromotion extends BaseBean {
    @IsKey
    @IsNotNull
    @IsAutoIncrement
    @TableId(type = IdType.AUTO)
    @ColumnType(MySqlTypeConstant.BIGINT)
    @Column(comment = "自增id")
    private Long id;

    @IsNotNull
    @Column(comment = "活动标题")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    private String title;

    @IsNotNull
    @Column(comment = "开始日期")
    @ColumnType(MySqlTypeConstant.TIMESTAMP)
    private Date startDate;

    @IsNotNull
    @Column(comment = "结束日期")
    @ColumnType(MySqlTypeConstant.TIMESTAMP)
    private Date endDate;

    @IsNotNull
    @Column(comment = "上下线状态(0 下线 1 上线)")
    @ColumnType(MySqlTypeConstant.TINYINT)
    @DefaultValue("0")
    private Integer status;
}
